package com.monster.entity;

import java.util.ArrayList;
import java.util.List;

/**
 * description:
 *
 * @author Yuanml on 2021/4/11 14:28
 */
public class Ip {
    public static List<String> getIpList(int num) {
        List<String> ipList = new ArrayList<>(num);
        for (int i = 1; i <= num; i++) {
            ipList.add("192.168.32." + i);
        }
        return ipList;
    }

    public static String call(String ip) {
        System.out.println(Thread.currentThread().getName() + "正在查询" + ip + "状态");
        try {
            Thread.sleep(1500);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println(Thread.currentThread().getName() + "查询" + ip + "状态完毕");
        return "ok";
    }
}
